/*
 * @Author: 张宝岩 18735713467@163.com
 * @Date: 2022-06-22 16:11:44
 * @LastEditors: 张宝岩 18735713467@163.com
 * @LastEditTime: 2022-06-22 19:10:04
 * @FilePath: /jj-cli/utils/base.js
 * @Description: 基础数据
 */
const promptList = [
    {
      type: 'list',
      message: '请选择发布环境:',
      name: 'env',
      choices: [
          "dev",
          "develop",
          "test",
          "master",
      ],
    },
    {
      type: "confirm",
      message: "是否执行发布",
      name: "isPush",
      suffix: "后缀",
    }
]
const gitTagList = [
{
    type: 'input',
    message: '请输入tag版本:',
    name: 'tagV',
    default: "1.0.1" // 默认值
},
{
    type: 'input',
    message: '请输入tag描述信息:',
    name: 'tagMsg',
    default: "test_tagmsg" // 默认值
}
]
const merageList = [
{
    type: 'list',
    message: '请选择合并master到分支:',
    name: 'env',
    choices: [
        "test",
        "uat",
    ],
},

]
const gitCommitPlugin = [
    {
        type: 'list',
        message: '请选择:',
        name: 'Specification',
        choices: [
            {
                key: 'in',
                name: '🎉 init: (项目初始化)',
                value: '🎉 init'
            },
            {
                key: 'fe',
                name: '✨ feat: (添加新特性)',
                value: '✨ feat'
            },
            {
                key: 'fi',
                name: '🐞 fix: (修复bug)',
                value: '🐞 fix'
            },
            {
                key: 'do',
                name: '📃 docs: (仅仅修改文档)',
                value: '📃 docs'
            },
            {
                key: 'st',
                name: '🌈 style: (仅仅修改了空格，格式缩进，逗号等等，不修改代码逻辑)',
                value: '🌈 style'
            },
            {
                key: 're',
                name: '🦄 refactor: (代码重构，没有修改bug或新增功能)',
                value: '🦄 refactor'
            },
            {
                key: 'pe',
                name: '🎈 perf: (优化相关，比如提升性能，体验)',
                value: '🎈 perf'
            },
            {
                key: 'bu',
                name: '🔧 build: (依赖相关功能)',
                value: '🔧 build'
            },
            {
                key: 'ci',
                name: '🐎 ci: (构建配置)',
                value: '🐎 ci'
            },
            {
                key: 'ch',
                name: '🐳 chore: (改变构建流程)',
                value: '🐳 chore'
            },
            {
                key: 're',
                name: '↩ revert: (回滚代码)',
                value: '↩ revert'
            }
        ],
        pageSize: 8
    },
    {
        type: 'input',
        message: '请输入操作范围:',
        name: 'scope',
        default: "(全局)", // 默认值
        filter: function (scope) {
           return `(${scope})：` 
        }
    },
    {
        type: 'input',
        message: '请输入提交信息:',
        name: 'msg',
        default: "test_msg" // 默认值
    }
]

module.exports = {
    promptList,
    gitTagList,
    merageList,
    gitCommitPlugin
}